const Query = require("./query");
const Mutation = require("./mutation");
const Note = require("./note");
const User = require("./user");
const { GraphQLDateTime } = require("graphql-iso-date");

// 为模式字段提供解析函数
module.exports = {
  Query,
  Mutation,
  Note,
  User,
  DateTime: GraphQLDateTime
};


/* 
测试的查询语句

mutation {
  toggleFavorite(id: "63cd3b81682c699e64f25cf9") {
    favoriteBy {
      username
    }
    favoriteCount
  }
}

query {
  note(id: "63cd3b81682c699e64f25cf9") {
    id
    content
    author(id: "63cd071b5f3a8b2fb0d9d220") {
      id
      username
    }
  }
}
*/